package com.yxy.common.enums;

public enum SportTypeEnum {

    RUN(1,"跑步","run.png","run_bg.jpg"),       //跑步
    SWIM(2,"游泳","swim.png","swim_bg.jpg"),  //游泳
    climb(3,"登山","climb.png","climb_bg.jpg"),//登山
    WALK(4,"散步","walk.png","walk_bg.jpg"),//散步
    BALL(5,"球类","ball.png","ball_bg.jpg"),
    DRIVE(6,"自驾","drive.png","drive_bg.jpg"),//自驾
    RIDE(7,"骑行","ride.png","ride_bg.jpg"),//骑行
    OTHER(8,"其他","other.png","other_bg.jpg");



    private int _value;

    private final int key;
    private final String sportTypeName;
    private final String sportTypeImg;
    private final String sportTypeBgImg;

    public int getKey() {
        return key;
    }

    public String getSportTypeName() {
        return sportTypeName;
    }

    public String getSportTypeImg() {
        return sportTypeImg;
    }

    public String getSportTypeBgImg() {
        return sportTypeBgImg;
    }


    SportTypeEnum(int key,String sportTypeName, String sportTypeImg, String sportTypeBgImg ) {
        this.key = key;
        this.sportTypeImg = sportTypeImg;
        this.sportTypeBgImg = sportTypeBgImg;
        this.sportTypeName =sportTypeName;
    }

    public static SportTypeEnum getValues(String sportTypeId){
        SportTypeEnum[] enums = SportTypeEnum.values();
        for (int i = 0; i <enums.length ; i++) {
            if(sportTypeId.equals(enums[i].getKey()+"")){
                return enums[i];
            }
        }
        return null;
    }
}
